import request from '@/utils/request'

/**
 * 获取新建仓库
 * @param data
 * @returns {AxiosPromise}
 */
export function saveWarehouse(data) {
  return request({
    url: '/api/base/warehouse/save',
    method: 'post',
    data
  })
}

/**
 * 获取编辑仓库
 * @param data
 * @returns {AxiosPromise}
 */
export function updateWarehouse(data) {
  return request({
    url: '/api/base/warehouse/update',
    method: 'post',
    data
  })
}

/**
 * 删除仓库
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteWarehouse(data) {
  return request({
    url: '/api/base/warehouse/delete',
    method: 'post',
    data
  })
}


/**
 * 获取列表
 * @param data
 * @returns {AxiosPromise}
 */
export function getWarehouseOptions() {
  return request({
    url: '/api/base/warehouse/list_pre_options',
    method: 'get',
  })
}
